# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
#   include csns::slurm::service
class csns::slurm::service {
	service {'munge':
          ensure => running,
          enable => true,
          hasstatus => true,
          hasrestart => true,
          restart => "service munge restart",
          require => Class["csns::slurm::config"],
#          notify => Service["slurmctld","slurmd"],
                        }

case $hostname {
	 /.*slurm.*?(?=\b)/:{
  	 service{'slurmctld':
          ensure => running,
          enable => true,
          hasstatus => true,
          hasrestart => true,
	  subscribe => Service['munge'],
          }
                    }
}
	service{'slurmd':
          ensure => running,
          enable => true,
          hasstatus => true,
          hasrestart => true,
	subscribe => Service['munge'],
          }
}


